package cn.zyq.baking.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**修改用户和保存用户封装用户数据*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private  Long id;
    private  String username;
    private String password;
    private String nickname;
    private  Integer isAdmin;
    private Date createTime;
    private String imgUrl;

    public User(String username, String password, String nickname, Integer isAdmin, Date createTime, String imgUrl) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.isAdmin = isAdmin;
        this.createTime = createTime;
        this.imgUrl = imgUrl;
    }

    //update-test
    public User(Long id, String nickname, Integer isAdmin, String imgUrl) {
        this.id = id;
        this.nickname = nickname;
        this.isAdmin = isAdmin;
        this.imgUrl = imgUrl;
    }
}
